import java.util.*;

public class RectControlerModel extends Models {
  private float _translateLR;
  private color _color;

  public RectControlerModel(PVector p, PVector siz, color c) {
    super(p, 1, siz);
    this._translateLR = 0;
    this._color = c;
  }

  public void draw() {
    fill(this._color);
    pushMatrix();
    translate((int)((this._pos.x)-(this._size.x/2)), (int)((this._pos.y)-(this._size.y/2)), this._pos.z);
    //translate(0, this._translateLR, 0);
    rect(0, 0, this._size.x, this._size.y);
    popMatrix();
  }

  public void setTranslateLR(float offset) {
    this._translateLR = offset;
  }

  public void update() {
    this.setPosition(new PVector(this._pos.x, this._pos.y + this._translateLR, this._pos.z));
  }
}

